package com.util;

import com.domain.User;
import com.opensymphony.xwork2.ActionInvocation;
import com.opensymphony.xwork2.interceptor.MethodFilterInterceptor;

//全局登陆拦截器
public class BOSLoginInterceptor extends MethodFilterInterceptor {
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	@Override
	protected String doIntercept(ActionInvocation invocation) throws Exception {
		User user = BOSContext.getUser();
		if(user!=null){
			return invocation.invoke();
		}
		return "fail";
	}
}
